package com.yehuo.app.entity.dto;

import com.yehuo.app.entity.Order;
import lombok.Data;
import org.springframework.web.bind.annotation.RequestMapping;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

@Data
public class SelectOrderDto extends Order implements Serializable {
    private Integer limit=10;

    private Integer page=1;

    private String userName;

    /**
     * 获取查询条件
     * @return
     */
    public Map<String, Object> getCondition(){
        Map<String, Object> map = new HashMap<>();
        map.put("orderNo", this.getOrderNo());
        map.put("orderType", this.getOrderType());
        map.put("payType", this.getPayType());
        map.put("orderId", this.getId());
        map.put("status", this.getStatus());
        map.put("endTime", this.getEndTime());
        map.put("startTime", this.getStartTime());
        map.put("userName", this.getUserName());
        return map;
    }
}
